﻿/*
 * SVN-based CodeReview
 * Copyright (c) Karim Agha <karim.dev@gmail.com>.
 */

namespace Sentio.CodeReview.Foundation
{
    using System.Collections.Generic;

    /// <summary>
    /// An interface implemented by all provider classes.
    /// Provider clases are the bond that connect that abstractions to the physical storage.
    /// </summary>
    public interface ITargetRepository
    {
        /// <summary>
        /// Get targets under a specified path.
        /// </summary>
        /// <param name="path">A relative path of the directory under which to retrieve targets.</param>
        /// <returns></returns>
        IEnumerable<Target> GetChildTargets(string path);

        /// <summary>
        /// Add a comment to a directory under the specified path.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="comment"></param>
        /// <returns></returns>
        bool AddComment(string path, BlockComment comment);

        /// <summary>
        /// Change a comment under the specified path.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="oldComment"></param>
        /// <param name="newComment"></param>
        /// <returns></returns>
        bool ChangeComment(string path, BlockComment oldComment, BlockComment newComment);
    }
}
